package com.itheima.ssm.dao;


import com.itheima.ssm.vo.Role;
import com.itheima.ssm.vo.Users;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UsersMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(Users record);

    int insertSelective(Users record);

    Users selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Users record);

    int updateByPrimaryKey(Users record);

    //=============================================================新增=========================



    Users findByUsername(String username);

    List<Users> findAll();

    Users findById(String id);

    void save(Users userInfo);

    void addRoleToUser(@Param("userId") String userId, @Param("roleId") String roleId);

    List<Role> findOtherRoles(String userId);
}